﻿using Microsoft.AspNetCore.Mvc;
using AutoMapper;
using B.S.Material.Domain.BOM;
using B.S.Material.Wirth.Api.Applications.Command.MaterialsCommnad;
using B.S.Material.Wirth.Api.Applications.Command.MaterialsChildCommand;
using B.S.Material.Wirth.Api.Applications.Command.MaterialsPickingCommand;
using B.S.Material.Wirth.Api.Applications.Handler.MaterialsPickingDetailHandler;
using B.S.Material.Wirth.Api.Applications.Command.MaterialsPickingDetailCommand;
using B.S.Material.Wirth.Api.Applications.Command.FeedingCommand;
using B.S.Material.Wirth.Api.Applications.Command.FeedDetailsCommand;
using B.S.Material.Wirth.Api.Dto;
using B.S.Material.Wirth.Api.Applications.Command.StrippingCommand;
using B.S.Material.Domain.Production_rejection;
using B.S.Material.Wirth.Api.Applications.Command.StrippingDetailsCommand;
using B.S.Material.Wirth.Api.Applications.Command.ProductionWasteZCommand;
using B.S.Material.Wirth.Api.Applications.Command.ScrapBreakdownCommand;
using B.S.Material.Domain.Scraps;
namespace B.S.Material.Wirth.Api
{
    public class AutoApp: Profile
    {
        public AutoApp()
        {
            //物料管理主表
            CreateMap<AddMaterialsCommand ,Materials>();
          
            CreateMap<UpdateMaterialsCommand, Materials>();
            CreateMap<DelMaterialsCommand, Materials>();
            CreateMap<PLDeleMaterialsCommand, Materials>();

            //物料管理子表
            CreateMap<AddMaterialsChildCommand, MaterialsChild>();
            CreateMap<CreaAddMaterialsChildCommand, Materials>();
            CreateMap<UpdateMaterialsChildCommand, MaterialsChild>();
            CreateMap<DelMaterialsChildCommand, MaterialsChild>();

            //生产领料主表
            CreateMap<AddMaterialsPickingCommand, MaterialsPicking>();
            CreateMap<UpdateMaterialsPickingCommand, MaterialsPicking>();
            CreateMap<DelMaterialsPickingCommand, MaterialsPicking>();

            //生产领料明细表
            CreateMap<AddMaterialsPickingDetailCommand, MaterialsPickingDetail>();
            CreateMap<DelMaterialsPickingDetailCommand, MaterialsPickingDetail>();
            CreateMap<UpdateMaterialsPickingDetailCommand, MaterialsPickingDetail>();

            //生产补料主表
            CreateMap<AddFeedingCommand, Feedings>();
            CreateMap<DelFeedingCommand, Feedings>();
            CreateMap<UpdateFeedingCommand, Feedings>();

            //生产补料明细表
            CreateMap<AddFeedDetailsCommand, FeedDetailss>();
            CreateMap<DelFeedDetailsCommand, FeedDetailss>();
            CreateMap<UpdateFeedDetailsCommand, FeedDetailss>();

            CreateMap<MaterialsPicking,MaterialsPickingDto>();

            //生产退料主表
            CreateMap<AddStrippingCommand, Stripping>();
            CreateMap<DelStrippingCommand, Stripping>();
            CreateMap<UpdateStrippingCommand, Stripping>();

            //生产退料明细
            CreateMap<AddStrippingDetailsCommand, StrippingDetails>();
            CreateMap<DelStrippingDetailsCommand, StrippingDetails>();
            CreateMap<UpdateStrippingDetailsCommand, StrippingDetails>();

            //生产废料主表
            CreateMap<AddProductionWasteZCommand, ProductionWasteZ>();
            CreateMap<DelProductionWasteZCommand, ProductionWasteZ>();
            CreateMap<UpdateProductionWasteZCommand, ProductionWasteZ>();

            //生产废料明细
            CreateMap<AddScrapBreakdownCommand, ScrapBreakdown>();
            CreateMap<DelScrapBreakdownCommand, ScrapBreakdown>();
            CreateMap<UpdateScrapBreakdownCommand, ScrapBreakdown>();


        }
    }
}
